import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/components/Index'
import My from '@/components/My'
import Order from '@/components/Order'
import Sort from '@/components/Sort'

Vue.use(VueRouter)
const router = new VueRouter({
  // 模糊匹配类名
  linkActiveClass: 'lac',
  // 精确匹配类名
  linkExactActiveClass: 'leac',
  routes: [
    // 路由重定向
    {
      path: '/',
      redirect:'/index',
    },
    {
      path: '/index',
      component: Index,
    },
    {
      path: '/my',
      component: My,
    },
    {
      path: '/Order',
      component: Order,
    },
    {
      path: '/Sort',
      component: Sort,
    },
  ],
})
export default router
